def expedition(p: list, m: list) -> int:
    index = 0
    m.sort(reverse=True)
    print(m)
    for tuple1 in p:
        for value in tuple1:
            flag_block_1 = False
            flag_block_2 = False
            for index1,value1 in enumerate(m):
                if (value >= value1) and not flag_block_1:
                    index += 1
                    del m[index1]
                    flag_block_1 = True
    print(index)
    return index

assert expedition([(5,10), (7,5), (5,5)], [9,5,3,5,12,30]) == 4
assert expedition([(200,100,1500,230), (10,20,30,40), (35,10,1,5)], [500,1,200,15,101,600,200,20,90,101,30]) == 8